<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="generator" content="VuePress 2.0.0-beta.63" />
    <meta name="theme" content="VuePress Theme Hope" />
    <meta property="og:url" content="https://mister-hope.github.io/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/2.html"><meta property="og:site_name" content="博哥编程日记"><meta property="og:title" content="Git常用命令"><meta property="og:description" content="Git常用命令"><meta property="og:type" content="article"><meta property="og:locale" content="zh-CN"><meta property="article:author" content="博哥"><meta property="article:tag" content="Git"><meta property="article:published_time" content="2022-01-01T00:00:00.000Z"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"Git常用命令","image":[""],"datePublished":"2022-01-01T00:00:00.000Z","dateModified":null,"author":[{"@type":"Person","name":"博哥","url":"https://mrhope.site"}]}</script><title>Git常用命令 | 博哥编程日记</title><meta name="description" content="Git常用命令">
    <style>
      :root {
        --bg-color: #fff;
      }

      html[data-theme="dark"] {
        --bg-color: #1d1e1f;
      }

      html,
      body {
        background: var(--bg-color);
      }
    </style>
    <script>
      const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
      const systemDarkMode =
        window.matchMedia &&
        window.matchMedia("(prefers-color-scheme: dark)").matches;

      if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
        document.documentElement.setAttribute("data-theme", "dark");
      }
    </script>
    <link rel="preload" href="/assets/style-2014766e.css" as="style"><link rel="stylesheet" href="/assets/style-2014766e.css">
    <link rel="modulepreload" href="/assets/app-aaaa3ca8.js"><link rel="modulepreload" href="/assets/2.html-20841d6f.js"><link rel="modulepreload" href="/assets/2.html-30504ee7.js"><link rel="modulepreload" href="/assets/plugin-vue_export-helper-c27b6911.js"><link rel="prefetch" href="/assets/intro.html-01033a91.js" as="script"><link rel="prefetch" href="/assets/index.html-21170a94.js" as="script"><link rel="prefetch" href="/assets/slides.html-5713b26a.js" as="script"><link rel="prefetch" href="/assets/1.html-446147d0.js" as="script"><link rel="prefetch" href="/assets/1.html-c784a035.js" as="script"><link rel="prefetch" href="/assets/1.html-b7991654.js" as="script"><link rel="prefetch" href="/assets/2.html-06882817.js" as="script"><link rel="prefetch" href="/assets/3.html-1b21215e.js" as="script"><link rel="prefetch" href="/assets/4.html-29c4753a.js" as="script"><link rel="prefetch" href="/assets/5.html-60a9662f.js" as="script"><link rel="prefetch" href="/assets/6.html-1e820cdf.js" as="script"><link rel="prefetch" href="/assets/7.html-aef07d0e.js" as="script"><link rel="prefetch" href="/assets/1.html-61538628.js" as="script"><link rel="prefetch" href="/assets/2.html-00ad10a6.js" as="script"><link rel="prefetch" href="/assets/3.html-6b59ab8e.js" as="script"><link rel="prefetch" href="/assets/4.html-dc81b6d4.js" as="script"><link rel="prefetch" href="/assets/1.html-475bec6b.js" as="script"><link rel="prefetch" href="/assets/3.html-f3e395f7.js" as="script"><link rel="prefetch" href="/assets/404.html-9e35849c.js" as="script"><link rel="prefetch" href="/assets/index.html-c56c18ec.js" as="script"><link rel="prefetch" href="/assets/index.html-c1ec14ac.js" as="script"><link rel="prefetch" href="/assets/index.html-e3c6b3be.js" as="script"><link rel="prefetch" href="/assets/index.html-274681a6.js" as="script"><link rel="prefetch" href="/assets/index.html-f511b4a2.js" as="script"><link rel="prefetch" href="/assets/index.html-5490b253.js" as="script"><link rel="prefetch" href="/assets/index.html-3adb3574.js" as="script"><link rel="prefetch" href="/assets/index.html-36609cce.js" as="script"><link rel="prefetch" href="/assets/index.html-3fc1c48c.js" as="script"><link rel="prefetch" href="/assets/index.html-cd68838e.js" as="script"><link rel="prefetch" href="/assets/index.html-669698ea.js" as="script"><link rel="prefetch" href="/assets/index.html-23f83797.js" as="script"><link rel="prefetch" href="/assets/index.html-58f1c3e8.js" as="script"><link rel="prefetch" href="/assets/index.html-ad5685a6.js" as="script"><link rel="prefetch" href="/assets/index.html-ed74641c.js" as="script"><link rel="prefetch" href="/assets/index.html-d5435bcf.js" as="script"><link rel="prefetch" href="/assets/index.html-860d5d5a.js" as="script"><link rel="prefetch" href="/assets/index.html-df426d45.js" as="script"><link rel="prefetch" href="/assets/index.html-dc66de44.js" as="script"><link rel="prefetch" href="/assets/index.html-75ad57c3.js" as="script"><link rel="prefetch" href="/assets/index.html-b645edb7.js" as="script"><link rel="prefetch" href="/assets/index.html-f1b0cfb7.js" as="script"><link rel="prefetch" href="/assets/index.html-46ab75c6.js" as="script"><link rel="prefetch" href="/assets/index.html-45dc2abf.js" as="script"><link rel="prefetch" href="/assets/index.html-38ffc216.js" as="script"><link rel="prefetch" href="/assets/index.html-1c05f737.js" as="script"><link rel="prefetch" href="/assets/intro.html-fe4d283f.js" as="script"><link rel="prefetch" href="/assets/index.html-60b785a4.js" as="script"><link rel="prefetch" href="/assets/slides.html-f9e028f9.js" as="script"><link rel="prefetch" href="/assets/1.html-1f93cc4c.js" as="script"><link rel="prefetch" href="/assets/1.html-b48d2cd9.js" as="script"><link rel="prefetch" href="/assets/1.html-4bdc34e5.js" as="script"><link rel="prefetch" href="/assets/2.html-f54016d0.js" as="script"><link rel="prefetch" href="/assets/3.html-34954f3c.js" as="script"><link rel="prefetch" href="/assets/4.html-3b237350.js" as="script"><link rel="prefetch" href="/assets/5.html-581cc5cc.js" as="script"><link rel="prefetch" href="/assets/6.html-8eb4e45b.js" as="script"><link rel="prefetch" href="/assets/7.html-f78e3115.js" as="script"><link rel="prefetch" href="/assets/1.html-9f8abcf8.js" as="script"><link rel="prefetch" href="/assets/2.html-33eccbfe.js" as="script"><link rel="prefetch" href="/assets/3.html-89bba491.js" as="script"><link rel="prefetch" href="/assets/4.html-ef7279e4.js" as="script"><link rel="prefetch" href="/assets/1.html-626be0b3.js" as="script"><link rel="prefetch" href="/assets/3.html-e71d394a.js" as="script"><link rel="prefetch" href="/assets/404.html-a40a0903.js" as="script"><link rel="prefetch" href="/assets/index.html-25d99c11.js" as="script"><link rel="prefetch" href="/assets/index.html-c1e2d99a.js" as="script"><link rel="prefetch" href="/assets/index.html-71e67cdd.js" as="script"><link rel="prefetch" href="/assets/index.html-2adb505e.js" as="script"><link rel="prefetch" href="/assets/index.html-91bd87e2.js" as="script"><link rel="prefetch" href="/assets/index.html-0f801cb1.js" as="script"><link rel="prefetch" href="/assets/index.html-e17156da.js" as="script"><link rel="prefetch" href="/assets/index.html-11edab8b.js" as="script"><link rel="prefetch" href="/assets/index.html-848f7f97.js" as="script"><link rel="prefetch" href="/assets/index.html-f04b9abc.js" as="script"><link rel="prefetch" href="/assets/index.html-3fbbeed4.js" as="script"><link rel="prefetch" href="/assets/index.html-e06ba07c.js" as="script"><link rel="prefetch" href="/assets/index.html-14a7bd68.js" as="script"><link rel="prefetch" href="/assets/index.html-ed8e5247.js" as="script"><link rel="prefetch" href="/assets/index.html-4429be62.js" as="script"><link rel="prefetch" href="/assets/index.html-53bb79db.js" as="script"><link rel="prefetch" href="/assets/index.html-551a5e8a.js" as="script"><link rel="prefetch" href="/assets/index.html-99c49873.js" as="script"><link rel="prefetch" href="/assets/index.html-d857e7b5.js" as="script"><link rel="prefetch" href="/assets/index.html-b74dc4d3.js" as="script"><link rel="prefetch" href="/assets/index.html-0167a147.js" as="script"><link rel="prefetch" href="/assets/index.html-ebb9ee37.js" as="script"><link rel="prefetch" href="/assets/index.html-07435e71.js" as="script"><link rel="prefetch" href="/assets/index.html-37ac29ae.js" as="script"><link rel="prefetch" href="/assets/index.html-351637f0.js" as="script"><link rel="prefetch" href="/assets/index.html-9c20dbaa.js" as="script"><link rel="prefetch" href="/assets/dash.all.min-01c02b4d.js" as="script"><link rel="prefetch" href="/assets/mpegts-d8e77270.js" as="script"><link rel="prefetch" href="/assets/hls.min-dbf944c0.js" as="script"><link rel="prefetch" href="/assets/artplayer-0687ddfd.js" as="script"><link rel="prefetch" href="/assets/plyr.min-fe499837.js" as="script"><link rel="prefetch" href="/assets/browser-21db0a97.js" as="script"><link rel="prefetch" href="/assets/plyr.min-fe499837.js" as="script"><link rel="prefetch" href="/assets/waline-meta-a31b78ed.js" as="script"><link rel="prefetch" href="/assets/component-1d1acfc1.js" as="script"><link rel="prefetch" href="/assets/auto-fa8841cf.js" as="script"><link rel="prefetch" href="/assets/index-ae8c1e74.js" as="script"><link rel="prefetch" href="/assets/flowchart-d65a1d8e.js" as="script"><link rel="prefetch" href="/assets/mermaid.core-c2465384.js" as="script"><link rel="prefetch" href="/assets/highlight.esm-75b11b9d.js" as="script"><link rel="prefetch" href="/assets/markdown.esm-0191f9da.js" as="script"><link rel="prefetch" href="/assets/math.esm-70a288c8.js" as="script"><link rel="prefetch" href="/assets/notes.esm-a106bb2c.js" as="script"><link rel="prefetch" href="/assets/reveal.esm-ec5549c1.js" as="script"><link rel="prefetch" href="/assets/search.esm-7e6792e2.js" as="script"><link rel="prefetch" href="/assets/zoom.esm-b83b91d0.js" as="script"><link rel="prefetch" href="/assets/VuePlayground-e029da53.js" as="script"><link rel="prefetch" href="/assets/photoswipe.esm-2450701e.js" as="script"><link rel="prefetch" href="/assets/pageview-0ac556cb.js" as="script"><link rel="prefetch" href="/assets/SearchResult-8d9c06af.js" as="script">
  </head>
  <body>
    <div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content" class="vp-skip-link sr-only">跳至主要內容</a><!--]--><div class="theme-container has-toc"><!--[--><header id="navbar" class="vp-navbar"><div class="vp-navbar-start"><button type="button" class="vp-toggle-sidebar-button" title="Toggle Sidebar"><span class="icon"></span></button><!--[--><!----><!--]--><!--[--><a class="vp-link vp-brand" href="/"><img class="vp-nav-logo" src="/logo.jpg" alt="博哥编程日记"><!----><span class="vp-site-name hide-in-pad">博哥编程日记</span></a><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-center"><!--[--><!----><!--]--><!--[--><nav class="vp-nav-links"><div class="nav-item hide-in-mobile"><a class="vp-link nav-link" href="/"><span class="font-icon icon fa-fw fa-sm fas fa-home" style=""></span>博哥编程日记<!----></a></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="基础"><span class="title"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>基础</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><h4 class="dropdown-subtitle"><span>Java基础</span></h4><ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E5%9F%BA%E7%A1%80/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>java面向对象<!----></a></li></ul></li></ul></button></div></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="中级"><span class="title"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>中级</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><h4 class="dropdown-subtitle"><span>前端框架VUE2</span></h4><ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>vue快速入门<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/2.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vuej基础知识(基本语法)<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/3.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vue基础知识(组件)<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/4.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vue基础知识(插槽)<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/5.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vue基础知识(路由) <!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/6.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vue状态管理<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E4%B8%AD%E7%BA%A7/vue2/7.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vue常用插件<!----></a></li></ul></li></ul></button></div></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="高级"><span class="title"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>高级</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><h4 class="dropdown-subtitle"><span>分布式技术</span></h4><ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/java%E9%AB%98%E7%BA%A7/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>分布式<!----></a></li></ul></li></ul></button></div></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="其他"><span class="title"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>其他</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><h4 class="dropdown-subtitle"><span>常用命令</span></h4><ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Docker常用命令<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link active" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/2.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Git常用命令<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/3.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Centos防火墙常用命令<!----></a></li></ul></li><li class="dropdown-item"><h4 class="dropdown-subtitle"><span>工具</span></h4><ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B7%A5%E5%85%B7/4.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>程序员必备网站<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B7%A5%E5%85%B7/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Vuepress常用命令和语法<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B7%A5%E5%85%B7/2.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>IDEA使用技巧合集<!----></a></li><li class="dropdown-subitem"><a class="vp-link nav-link" href="/posts/%E5%85%B6%E4%BB%96/%E5%B7%A5%E5%85%B7/3.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>IDEA快捷键<!----></a></li></ul></li></ul></button></div></div><div class="nav-item hide-in-mobile"><a href="https://gitmind.cn/app/docs/mkc3y3cx" rel="noopener noreferrer" target="_blank" aria-label="知识图谱导航" class="nav-link"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>知识图谱导航<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="nav-item hide-in-mobile"><a href="https://zmkj_8073.gitee.io/boge_code_repository/boge_bc/index.html" rel="noopener noreferrer" target="_blank" aria-label="联系我" class="nav-link"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>联系我<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div></nav><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-end"><!--[--><!----><!--]--><!--[--><!----><div class="nav-item vp-repo"><a class="vp-repo-link" href="https://github.com/vuepress-theme-hope/vuepress-theme-hope" target="_blank" rel="noopener noreferrer" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="icon github-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="github icon" style="width:1.25rem;height:1.25rem;vertical-align:middle;"><path d="M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"></path></svg></a></div><div class="nav-item hide-in-mobile"><button type="button" class="outlook-button" tabindex="-1" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="icon outlook-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="outlook icon"><path d="M224 800c0 9.6 3.2 44.8 6.4 54.4 6.4 48-48 76.8-48 76.8s80 41.6 147.2 0 134.4-134.4 38.4-195.2c-22.4-12.8-41.6-19.2-57.6-19.2C259.2 716.8 227.2 761.6 224 800zM560 675.2l-32 51.2c-51.2 51.2-83.2 32-83.2 32 25.6 67.2 0 112-12.8 128 25.6 6.4 51.2 9.6 80 9.6 54.4 0 102.4-9.6 150.4-32l0 0c3.2 0 3.2-3.2 3.2-3.2 22.4-16 12.8-35.2 6.4-44.8-9.6-12.8-12.8-25.6-12.8-41.6 0-54.4 60.8-99.2 137.6-99.2 6.4 0 12.8 0 22.4 0 12.8 0 38.4 9.6 48-25.6 0-3.2 0-3.2 3.2-6.4 0-3.2 3.2-6.4 3.2-6.4 6.4-16 6.4-16 6.4-19.2 9.6-35.2 16-73.6 16-115.2 0-105.6-41.6-198.4-108.8-268.8C704 396.8 560 675.2 560 675.2zM224 419.2c0-28.8 22.4-51.2 51.2-51.2 28.8 0 51.2 22.4 51.2 51.2 0 28.8-22.4 51.2-51.2 51.2C246.4 470.4 224 448 224 419.2zM320 284.8c0-22.4 19.2-41.6 41.6-41.6 22.4 0 41.6 19.2 41.6 41.6 0 22.4-19.2 41.6-41.6 41.6C339.2 326.4 320 307.2 320 284.8zM457.6 208c0-12.8 12.8-25.6 25.6-25.6 12.8 0 25.6 12.8 25.6 25.6 0 12.8-12.8 25.6-25.6 25.6C470.4 233.6 457.6 220.8 457.6 208zM128 505.6C128 592 153.6 672 201.6 736c28.8-60.8 112-60.8 124.8-60.8-16-51.2 16-99.2 16-99.2l316.8-422.4c-48-19.2-99.2-32-150.4-32C297.6 118.4 128 291.2 128 505.6zM764.8 86.4c-22.4 19.2-390.4 518.4-390.4 518.4-22.4 28.8-12.8 76.8 22.4 99.2l9.6 6.4c35.2 22.4 80 12.8 99.2-25.6 0 0 6.4-12.8 9.6-19.2 54.4-105.6 275.2-524.8 288-553.6 6.4-19.2-3.2-32-19.2-32C777.6 76.8 771.2 80 764.8 86.4z"></path></svg><div class="outlook-dropdown"><!----></div></button></div><!--[--><button type="button" class="search-pro-button" role="search" aria-label="搜索"><svg xmlns="http://www.w3.org/2000/svg" class="icon search-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="search icon"><path d="M192 480a256 256 0 1 1 512 0 256 256 0 0 1-512 0m631.776 362.496-143.2-143.168A318.464 318.464 0 0 0 768 480c0-176.736-143.264-320-320-320S128 303.264 128 480s143.264 320 320 320a318.016 318.016 0 0 0 184.16-58.592l146.336 146.368c12.512 12.48 32.768 12.48 45.28 0 12.48-12.512 12.48-32.768 0-45.28"></path></svg><div class="search-pro-placeholder">搜索</div><div class="search-pro-key-hints"><kbd class="search-pro-key">Ctrl</kbd><kbd class="search-pro-key">K</kbd></div></button><!--]--><!--]--><!--[--><!----><!--]--><button type="button" class="vp-toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span><span class="vp-top"></span><span class="vp-middle"></span><span class="vp-bottom"></span></span></button></div></header><!----><!--]--><!----><div class="toggle-sidebar-wrapper"><span class="arrow start"></span></div><aside id="sidebar" class="vp-sidebar"><!--[--><!----><!--]--><ul class="vp-sidebar-links"><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/"><span class="font-icon icon fa-fw fa-sm fas fa-home" style=""></span>博哥编程日记<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><section class="vp-sidebar-group"><p class="vp-sidebar-heading active"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span><span class="vp-sidebar-title">Java一站式知识库</span><!----></p><ul class="vp-sidebar-links"><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable active" type="button"><!----><span class="vp-sidebar-title">其他</span><span class="vp-arrow down"></span></button><ul class="vp-sidebar-links"><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable active" type="button"><!----><span class="vp-sidebar-title">常用命令</span><span class="vp-arrow down"></span></button><ul class="vp-sidebar-links"><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/3.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Centos防火墙常用命令<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/1.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Docker常用命令<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link active vp-sidebar-link vp-sidebar-page active" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/2.html"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Git常用命令<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">工具</span><span class="vp-arrow end"></span></button><!----></section></li></ul></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">Java高级</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">Java基础</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">Java中级</span><span class="vp-arrow end"></span></button><!----></section></li></ul></section></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/intro.html"><span class="font-icon icon fa-fw fa-sm fas fa-circle-info" style=""></span>关于博哥<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul><!--[--><!----><!--]--></aside><!--[--><main id="main-content" class="vp-page"><!--[--><!----><!----><nav class="vp-breadcrumb disable"></nav><div class="vp-page-title"><h1><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Git常用命令</h1><div class="page-info"><span class="page-author-info" aria-label="作者"><svg xmlns="http://www.w3.org/2000/svg" class="icon author-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="author icon"><path d="M649.6 633.6c86.4-48 147.2-144 147.2-249.6 0-160-128-288-288-288s-288 128-288 288c0 108.8 57.6 201.6 147.2 249.6-121.6 48-214.4 153.6-240 288-3.2 9.6 0 19.2 6.4 25.6 3.2 9.6 12.8 12.8 22.4 12.8h704c9.6 0 19.2-3.2 25.6-12.8 6.4-6.4 9.6-16 6.4-25.6-25.6-134.4-121.6-240-243.2-288z"></path></svg><span><a class="page-author-item" href="https://mrhope.site" target="_blank" rel="noopener noreferrer">博哥</a></span><span property="author" content="博哥"></span></span><!----><span class="page-date-info" aria-label="写作日期"><svg xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="calendar icon"><path d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z"></path></svg><span><!----></span><meta property="datePublished" content="2022-01-01T00:00:00.000Z"></span><span class="page-pageview-info" aria-label="访问量"><svg xmlns="http://www.w3.org/2000/svg" class="icon eye-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="eye icon"><path d="M992 512.096c0-5.76-.992-10.592-1.28-11.136-.192-2.88-1.152-8.064-2.08-10.816-.256-.672-.544-1.376-.832-2.08-.48-1.568-1.024-3.104-1.6-4.32C897.664 290.112 707.104 160 512 160c-195.072 0-385.632 130.016-473.76 322.592-1.056 2.112-1.792 4.096-2.272 5.856a55.512 55.512 0 00-.64 1.6c-1.76 5.088-1.792 8.64-1.632 7.744-.832 3.744-1.568 11.168-1.568 11.168-.224 2.272-.224 4.032.032 6.304 0 0 .736 6.464 1.088 7.808.128 1.824.576 4.512 1.12 6.976h-.032c.448 2.08 1.12 4.096 1.984 6.08.48 1.536.992 2.976 1.472 4.032C126.432 733.856 316.992 864 512 864c195.136 0 385.696-130.048 473.216-321.696 1.376-2.496 2.24-4.832 2.848-6.912.256-.608.48-1.184.672-1.728 1.536-4.48 1.856-8.32 1.728-8.32l-.032.032c.608-3.104 1.568-7.744 1.568-13.28zM512 672c-88.224 0-160-71.776-160-160s71.776-160 160-160 160 71.776 160 160-71.776 160-160 160z"></path></svg><span id="ArtalkPV" class="waline-pageview-count" data-path="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/2.html">...</span></span><span class="page-reading-time-info" aria-label="阅读时间"><svg xmlns="http://www.w3.org/2000/svg" class="icon timer-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="timer icon"><path d="M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"></path></svg><span>大约 4 分钟</span><meta property="timeRequired" content="PT4M"></span><span class="page-category-info" aria-label="分类"><svg xmlns="http://www.w3.org/2000/svg" class="icon category-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="category icon"><path d="M148.41 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H148.41c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.311-40.31zM147.556 553.478H429.73c22.263 0 40.311 18.048 40.311 40.31v282.176c0 22.263-18.048 40.312-40.31 40.312H147.555c-22.263 0-40.311-18.049-40.311-40.312V593.79c0-22.263 18.048-40.311 40.31-40.311zM593.927 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H593.927c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.31-40.31zM730.22 920.502H623.926c-40.925 0-74.22-33.388-74.22-74.425V623.992c0-41.038 33.387-74.424 74.425-74.424h222.085c41.038 0 74.424 33.226 74.424 74.067v114.233c0 10.244-8.304 18.548-18.547 18.548s-18.548-8.304-18.548-18.548V623.635c0-20.388-16.746-36.974-37.33-36.974H624.13c-20.585 0-37.331 16.747-37.331 37.33v222.086c0 20.585 16.654 37.331 37.126 37.331H730.22c10.243 0 18.547 8.304 18.547 18.547 0 10.244-8.304 18.547-18.547 18.547z"></path></svg><!--[--><span class="page-category-item clickable" role="navigation">常用命令</span><!--]--><meta property="articleSection" content="常用命令"></span><span class="page-tag-info" aria-label="标签"><svg xmlns="http://www.w3.org/2000/svg" class="icon tag-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="tag icon"><path d="M939.902 458.563L910.17 144.567c-1.507-16.272-14.465-29.13-30.737-30.737L565.438 84.098h-.402c-3.215 0-5.726 1.005-7.634 2.913l-470.39 470.39a10.004 10.004 0 000 14.164l365.423 365.424c1.909 1.908 4.42 2.913 7.132 2.913s5.223-1.005 7.132-2.913l470.39-470.39c2.01-2.11 3.014-5.023 2.813-8.036zm-240.067-72.121c-35.458 0-64.286-28.828-64.286-64.286s28.828-64.285 64.286-64.285 64.286 28.828 64.286 64.285-28.829 64.286-64.286 64.286z"></path></svg><!--[--><span class="page-tag-item clickable" role="navigation">Git</span><!--]--><meta property="keywords" content="Git"></span></div><hr></div><!----><!----><div class="theme-hope-content"><h1 id="git常用命令" tabindex="-1"><a class="header-anchor" href="#git常用命令" aria-hidden="true">#</a> Git常用命令</h1><!-- more --><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="shiki rose-pine-moon" style="background-color:#232136;" tabindex="0"><code><span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">init</span><span style="color:#E0DEF4;">                                                  </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 初始化本地git仓库（创建新仓库）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">user.name</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&quot;xxx&quot;</span><span style="color:#E0DEF4;">                       </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 配置用户名</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">user.email</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&quot;xxx@xxx.com&quot;</span><span style="color:#E0DEF4;">              </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 配置邮件</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">color.ui</span><span style="color:#E0DEF4;"> </span><span style="color:#EA9A97;">true</span><span style="color:#E0DEF4;">                         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> git status等命令自动着色</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">color.status</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">auto</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">color.diff</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">auto</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">color.branch</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">auto</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">color.interactive</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">auto</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">config</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--global</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--unset</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">http.proxy</span><span style="color:#E0DEF4;">                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> remove  proxy configuration on git</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">clone</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">git+ssh://git@192.168.53.168/VT.git</span><span style="color:#E0DEF4;">             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> clone远程仓库</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">status</span><span style="color:#E0DEF4;">                                                </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 查看当前版本状态（是否修改）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">add</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">xyz</span><span style="color:#E0DEF4;">                                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 添加xyz文件至index</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">add</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">.</span><span style="color:#E0DEF4;">                                                 </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 增加当前子目录下所有更改过的文件至index</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">commit</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-m</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&#39;xxx&#39;</span><span style="color:#E0DEF4;">                                       </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 提交</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">commit</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--amend</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-m</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&#39;xxx&#39;</span><span style="color:#E0DEF4;">                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 合并上一次提交（用于反复修改）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">commit</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-am</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&#39;xxx&#39;</span><span style="color:#E0DEF4;">                                      </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 将add和commit合为一步</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">rm</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">xxx</span><span style="color:#E0DEF4;">                                                </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 删除index中的文件</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">rm</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-r</span><span style="color:#E0DEF4;"> </span><span style="color:#E0DEF4;font-style:italic;">*</span><span style="color:#E0DEF4;">                                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 递归删除</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;">                                                   </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示提交日志</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-1</span><span style="color:#E0DEF4;">                                                </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示1行日志 -n为n行</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-5</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--stat</span><span style="color:#E0DEF4;">                                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示提交日志及相关变动文件</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-p</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-m</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">dfb02e6e4f2f7b573337763e5c0013802e392818</span><span style="color:#E0DEF4;">         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示某个提交的详细内容</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">dfb02</span><span style="color:#E0DEF4;">                                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 可只用commitid的前几位</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD</span><span style="color:#E0DEF4;">                                             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示HEAD提交日志</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD^</span><span style="color:#E0DEF4;">                                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示HEAD的父（上一个版本）的提交日志 ^^为上两个版本 ^5为上5个版本</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">tag</span><span style="color:#E0DEF4;">                                                   </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示已存在的tag</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">tag</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-a</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">v2.0</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-m</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&#39;xxx&#39;</span><span style="color:#E0DEF4;">                                  </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 增加v2.0的tag</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">v2.0</span><span style="color:#E0DEF4;">                                             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示v2.0的日志及详细内容</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">v2.0</span><span style="color:#E0DEF4;">                                              </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示v2.0的日志</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;">                                                  </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有未添加至index的变更</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--cached</span><span style="color:#E0DEF4;">                                         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有已添加index但还未commit的变更</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD^</span><span style="color:#E0DEF4;">                                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 比较与上一个版本的差异</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">./lib</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 比较与HEAD版本lib目录的差异</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin/master..master</span><span style="color:#E0DEF4;">                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 比较远程分支master上有本地分支master上没有的</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">diff</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin/master..master</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--stat</span><span style="color:#E0DEF4;">                     </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 只显示差异的文件，不显示具体内容</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">remote</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">add</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">git+ssh://git@192.168.53.168/VT.git</span><span style="color:#E0DEF4;"> </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 增加远程定义（用于push/pull/fetch）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;">                                                </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示本地分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--contains</span><span style="color:#E0DEF4;"> </span><span style="color:#EA9A97;">50089</span><span style="color:#E0DEF4;">                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示包含提交50089的分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-a</span><span style="color:#E0DEF4;">                                             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-r</span><span style="color:#E0DEF4;">                                             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有原创分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--merged</span><span style="color:#E0DEF4;">                                       </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有已合并到当前分支的分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--no-merged</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有未合并到当前分支的分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-m</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master_copy</span><span style="color:#E0DEF4;">                          </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 本地分支改名</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-b</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master_copy</span><span style="color:#E0DEF4;">                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 从当前分支创建新分支master_copy并检出</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-b</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master_copy</span><span style="color:#E0DEF4;">                        </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 上面的完整版</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">features/performance</span><span style="color:#E0DEF4;">                         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 检出已存在的features/performance分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--track</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">hotfixes/BJVEP933</span><span style="color:#E0DEF4;">                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 检出远程分支hotfixes/BJVEP933并创建本地跟踪分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">v2.0</span><span style="color:#E0DEF4;">                                         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 检出版本v2.0</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-b</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">devel</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin/develop</span><span style="color:#E0DEF4;">                      </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 从远程分支develop创建新本地分支devel并检出</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">checkout</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">README</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 检出head版本的README文件（可用于修改错误回退）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">merge</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin/master</span><span style="color:#E0DEF4;">                                   </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 合并远程master分支至当前分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">cherry-pick</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">ff44785404a8e</span><span style="color:#E0DEF4;">                             </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 合并提交ff44785404a8e的修改</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">push</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 将当前分支push到远程master分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">push</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">:hotfixes/BJVEP933</span><span style="color:#E0DEF4;">                        </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 删除远程仓库的hotfixes/BJVEP933分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">push</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--tags</span><span style="color:#E0DEF4;">                                           </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 把所有tag推送到远程仓库</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">fetch</span><span style="color:#E0DEF4;">                                                 </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 获取所有远程分支（不更新本地分支，另需merge）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">fetch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--prune</span><span style="color:#E0DEF4;">                                         </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 获取所有原创分支并清除服务器上已删掉的分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">pull</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">origin</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 获取远程分支master并merge到当前分支</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">mv</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">README</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">README2</span><span style="color:#E0DEF4;">                                     </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 重命名文件README为README2</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">reset</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--hard</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD</span><span style="color:#E0DEF4;">                                     </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 将当前版本重置为HEAD（通常用于merge失败回退）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">rebase</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-d</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">hotfixes/BJVEP933</span><span style="color:#E0DEF4;">                           </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 删除分支hotfixes/BJVEP933（本分支修改已合并到其他分支）</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-D</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">hotfixes/BJVEP933</span><span style="color:#E0DEF4;">                           </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 强制删除分支hotfixes/BJVEP933</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">ls-files</span><span style="color:#E0DEF4;">                                              </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 列出git index包含的文件</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show-branch</span><span style="color:#E0DEF4;">                                           </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 图示当前分支历史</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show-branch</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--all</span><span style="color:#E0DEF4;">                                     </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 图示所有分支历史</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">whatchanged</span><span style="color:#E0DEF4;">                                           </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示提交历史对应的文件修改</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">revert</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">dfb02e6e4f2f7b573337763e5c0013802e392818</span><span style="color:#E0DEF4;">       </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 撤销提交dfb02e6e4f2f7b573337763e5c0013802e392818</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">ls-tree</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD</span><span style="color:#E0DEF4;">                                          </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 内部命令：显示某个git对象</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">rev-parse</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">v2.0</span><span style="color:#E0DEF4;">                                        </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 内部命令：显示某个ref对于的SHA1 HASH</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">reflog</span><span style="color:#E0DEF4;">                                                </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示所有提交，包括孤立节点</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD@{</span><span style="color:#EA9A97;">5</span><span style="color:#F6C177;">}</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">master@{yesterday}</span><span style="color:#E0DEF4;">                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 显示master分支昨天的状态</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">log</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--pretty=format:</span><span style="color:#F6C177;">&#39;%h %s&#39;</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--graph</span><span style="color:#E0DEF4;">                   </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 图示提交日志</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">HEAD~3</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-s</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--pretty=raw</span><span style="color:#E0DEF4;"> </span><span style="color:#EA9A97;">2</span><span style="color:#F6C177;">be7fcb476</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash</span><span style="color:#E0DEF4;">                                                 </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 暂存当前修改，将所有至为HEAD状态</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">list</span><span style="color:#E0DEF4;">                                            </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 查看所有暂存</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">show</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-p</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash@{</span><span style="color:#EA9A97;">0</span><span style="color:#F6C177;">}</span><span style="color:#E0DEF4;">                               </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 参考第一次暂存</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">apply</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">stash@{</span><span style="color:#EA9A97;">0</span><span style="color:#F6C177;">}</span><span style="color:#E0DEF4;">                                 </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 应用第一次暂存</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">grep</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&quot;delete from&quot;</span><span style="color:#E0DEF4;">                                    </span><span style="color:#908CAA;font-style:italic;">#</span><span style="color:#6E6A86;font-style:italic;"> 文件中搜索文本“delete from”</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">grep</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-e</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">&#39;#define&#39;</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">--and</span><span style="color:#E0DEF4;"> </span><span style="color:#3E8FB0;">-e</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">SORT_DIRENT</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">gc</span></span>
<span class="line"><span style="color:#EA9A97;">git</span><span style="color:#E0DEF4;"> </span><span style="color:#F6C177;">fsck</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></div><!----><footer class="page-meta"><!----><div class="meta-item git-info"><!----><!----></div></footer><nav class="vp-page-nav"><a class="vp-link nav-link prev" href="/posts/%E5%85%B6%E4%BB%96/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/1.html"><div class="hint"><span class="arrow start"></span>上一页</div><div class="link"><span class="font-icon icon fa-fw fa-sm fas fa-file" style=""></span>Docker常用命令</div></a><!----></nav><div id="comment" class="waline-wrapper" darkmode="false" style="display:none;"><div data-waline provider="Waline"><!--v-if--><div class="wl-comment"><!--v-if--><div class="wl-panel"><div class="wl-header item3"><!--[--><div class="wl-header-item"><label for="wl-nick">昵称</label><input id="wl-nick" class="wl-input wl-nick" name="nick" type="text" value></div><div class="wl-header-item"><label for="wl-mail">邮箱</label><input id="wl-mail" class="wl-input wl-mail" name="mail" type="email" value></div><div class="wl-header-item"><label for="wl-link">网址</label><input id="wl-link" class="wl-input wl-link" name="link" type="text" value></div><!--]--></div><textarea id="wl-edit" class="wl-editor" placeholder="请留言。(填写邮箱可在被回复时收到邮件提醒)"></textarea><div class="wl-preview" style="display:none;"><hr><h4>预览:</h4><div class="wl-content"></div></div><div class="wl-footer"><div class="wl-actions"><a href="https://guides.github.com/features/mastering-markdown/" title="Markdown Guide" aria-label="Markdown is supported" class="wl-action" target="_blank" rel="noopener noreferrer"><svg width="16" height="16" ariaHidden="true"><path d="M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z" fill="currentColor"></path></svg></a><button type="button" class="wl-action" title="表情" style="display:none;"><svg viewBox="0 0 1024 1024" width="24" height="24"><path d="M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z" fill="currentColor"></path></svg></button><button type="button" class="wl-action" title="表情包"><svg width="24" height="24" fill="currentcolor" viewBox="0 0 24 24"><path style="transform: translateY(0.5px)" d="M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"></path><path d="M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"></path></svg></button><input id="wl-image-upload" class="upload" type="file" accept=".png,.jpg,.jpeg,.webp,.bmp,.gif"><label for="wl-image-upload" class="wl-action" title="上传图片"><svg viewBox="0 0 1024 1024" width="24" height="24"><path d="M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z" fill="currentColor"></path><path d="M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z" fill="currentColor"></path></svg></label><button type="button" class="wl-action" title="预览"><svg viewBox="0 0 1024 1024" width="24" height="24"><path d="M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0" fill="currentColor"></path><path d="M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0" fill="currentColor"></path></svg></button></div><div class="wl-info"><div class="wl-captcha-container"></div><div class="wl-text-number">0 <!--v-if-->  字</div><button type="button" class="wl-btn">登录</button><button type="submit" class="primary wl-btn" title="Cmd|Ctrl + Enter"><!--[-->提交<!--]--></button></div><div class="wl-gif-popup"><input type="text" placeholder="搜索表情包"><!--v-if--><div class="wl-loading"><svg width="30" height="30" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="currentColor" strokeWidth="4" r="40" stroke-dasharray="85 30"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform></circle></svg></div></div><div class="wl-emoji-popup"><!--[--><!--]--><!--v-if--></div></div></div><!--v-if--></div><div class="wl-meta-head"><div class="wl-count"><!--v-if--> 评论</div><ul class="wl-sort"><!--[--><li class="active">按正序</li><li class="">按倒序</li><li class="">按热度</li><!--]--></ul></div><div class="wl-cards"><!--[--><!--]--></div><!--[--><div class="wl-loading"><svg width="30" height="30" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="currentColor" strokeWidth="4" r="40" stroke-dasharray="85 30"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform></circle></svg></div><!--]--><div class="wl-power"> Powered by <a href="https://github.com/walinejs/waline" target="_blank" rel="noopener noreferrer"> Waline </a> v2.15.5</div></div></div><!----><!--]--></main><!--]--><footer class="vp-footer-wrapper"><div class="vp-footer">falsed</div><div class="vp-copyright">Copyright © 2023 博哥</div></footer></div><!--]--><!----><!----><!--]--></div>
    <script type="module" src="/assets/app-aaaa3ca8.js" defer></script>
  </body>
</html>
